package poidemo.docx4j;

import java.io.File;
import java.util.List;
import org.docx4j.openpackaging.exceptions.Docx4JException;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart;

public class DocxWalk {

	public static void main(String[] args) throws Docx4JException {
		test1(args);
	}



	public static void test1(String[] args) throws Docx4JException {
		WordprocessingMLPackage pkg = WordprocessingMLPackage
				.load(new File("D:\\tmp\\docx\\test6.docx"));
		MainDocumentPart mainPart = pkg.getMainDocumentPart();
		System.out.println("========================================================");
		System.out.println(mainPart.getXML());
		System.out.println("========================================================");
		List<Object> contents = mainPart.getContent();
	}

}
